The present invention relates to a technique for use with a system including a plurality of physical machines (real machines) capable of executing virtual machines, and in particular, to a method of migrating a virtual machine from a first physical machine to a second physical machine, a computer using the method, a virtualizer using the method, and a computer system using the method.
According to the virtual technique, it is possible to increase utilization efficiency of hardware resources such as processors, memories, and input and output units. It is also possible to change allocation of such resources to collect a plurality of jobs or applications on one physical machine. Additionally, the virtual technique realizes a function in which a virtual machine being executed on a first physical machine is migrated to a second physical machine to be executed on a virtualizing section or a virtualizer of the second machine.
In a migration function of a virtual machine, a storage and a network which are external devices accessible from two associated physical machines are prepared. Depending on cases, a virtual machine definition file is also configured as an image in the storage accessible from the physical machines.
However, in operation of such storage accessible from a plurality of physical machines, any physical machine connected to the storage is capable of referring to or updating storage volumes in the storage. This leads to a problem of security. To enhance security, there is employed a function to restrict or to control access to a storage volume in the storage and access to a network. In general, the access control is carried out by use of a name and an address of a request source unit having issued a request to access a resource, for example, by establishing a correspondence between a particular physical machine and a storage volume in an associated storage.
In access control of a virtual machine, it is possible to establish a correspondence between the virtual machine and a resource by use of a name and an address assigned to the virtual machine. When the virtual machine is migrated, the name and the address are moved at the same time in general. It is hence possible to retain the access control without changing the setting of the switches and the storages in association with the migration of the virtual machine.
On the other hand, when moving a virtual machine from a first physical machine as a migration source to a second physical machine as a migration destination, the virtual machine definition file is not shared between virtualizers respectively of the first and second physical machines in some cases. In a situation in which a file including information to define a configuration of the virtual machine is individually managed by a virtualizer of the physical machine to execute the virtual machine, a managing server creates the virtual machine definition file in the migration destination. After moving the virtual machine to the migration destination, the managing server deletes the virtual machine definition file from the migration source.
JP-A-2008-217302 (Patent Document 1) describes a technique in which when the virtualizer differs in its kind between a migration source and a migration destination, a setting file required for operation of the virtual machine is copied and the copied file is converted according to the virtualizer of the migration destination. To suppress downtime during the virtual machine migration, the virtualizer includes a collecting section to collect information of configurations of virtual machines. In response to an instruction from a managing server, the virtualizer collects, converts, and updates the information.
As above, the managing server is employed to simplify the operation required for the virtual machine migration and to monitor the migration state. In a situation in which the managing server is not available or communication between the managing server and the virtual machines is disconnected, the migration of the virtual machine is suspended and then the virtual machine is restored to the state before the migration in general.
A technique in which when migration of a virtual machine is started, the state of migration is monitored is described in pages 164 to 169 of Red Book “IBM System p Live Partition Mobility” published in October 2007 from IBM. If the migration fails, a managing server carried out a recovery operation. To prevent two physical machines from simultaneously executing a virtual machine assigned with the same name and the same address, the recovery function of the managing server appropriately restores the configuration of the virtual machine to the state before migration or the state after migration.